package com.gitee.huanminabc.fastboot.orm.sqlpaginator;

/**
 * PostgreSQL 分页器实现
 */
public class PostgreSqlPaginator implements SqlPaginator {
    @Override
    public String paginate(String sql, int offset, int limit) {
        // PostgreSQL 使用标准的 LIMIT 和 OFFSET
        return String.format("SELECT * FROM (%s) AS t LIMIT %d OFFSET %d", sql, limit, offset);
    }
}